import { createApp, provide } from 'vue'
import './style.css'
import App from './App.vue'
import router from "./router"
import $store from './store'
import setRoute from "./grants/router"
import pinia from "../src/piniaStore"

const app = createApp(App)

if (sessionStorage.getItem("grants")) {
    if (!$store.state.isGetRoute) {
        setRoute()
        $store.commit({
            type: "changeIsGetRoute",
            isGetRoute: true
        })
    }
}
app.use(router)
app.use(pinia)



app.mount('#app')